<template>
	<view class="users-card">
		<view class="users-card-content">
			<view class="users-card-item" v-for="(item,index) in props.modelList" :key="index">
				<view class="card-number" @click="toOtherPage(item.pageSrc)">
					<slot name="top" :imgSrc="item.imgSrc" :number="item.number"></slot>
				</view>
				<view class="card-text">
					<text>{{item.title}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>

	const props = defineProps({
		modelList:{
			type:Array,
			default: () => [{}],
		}
	})
	// console.log(props);
	
	const toOtherPage = (src) =>{
		uni.navigateTo({
			url:src
		})
	}
</script>

<style lang="scss" scoped>

	
	.users-card{
		// margin-top: 20rpx;
		width: 700rpx;
		.users-card-content{
			display: flex;
			width: 100%;
			.users-card-item{
				display: flex;
				flex-direction: column;
				justify-content:center;
				align-items: center;
				// border: 1px black solid;
				height: 150rpx;
				width: calc(700rpx / 4);
				margin: 5rpx;
				.card-number{
					display: flex;
					justify-content: center;
					align-items: center;
					font-weight: 700;
					// text-align: center;
					width: 100%;
					>img{
						width: 45%;
						// height: 100%;
					}
				}
				.card-text{
					margin-top: 10rpx;
					font-weight: 600;
					color: rgb(140, 140, 141);
				}
			}
		}
	}
</style>